function showInfoStation(data){
	var open;
	if(data.open==1){
		open="Station ouverte";
	}
	else{
		open="Station fermée";
	}

	$('h1.ui-title').html(targetNom);
	$('.page-station div[data-role="content"]').html("<span class='popupDistance'><strong>Distance</strong><br>"+targetDistance+"</span>");
	$('.page-station div[data-role="content"]').append("<span class='popupLibre'><strong>Velos disponibles</strong><br>"+data.available+"/"+data.total+" - "+open+"</span>");
	//Masque le loading page
	$.mobile.hidePageLoadingMsg();
}

$(".page-station").on("pageshow", function (event, data) {
	$('.menu').load('menu.html',function(){ $('#menu').panel(); });
	
	var query = window.location.search;
	query = query.replace("?id=","");

	getDisponibity(query,showInfoStation);
});

